package com.tuanzi.loan.web.lazy.product.product;

import com.tuanzi.loan.business.service.product.product.LoanProductConsumeRecordService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.product.product.LoanProductConsumeSearchRequest;
import com.tuanzi.loan.vo.response.product.product.LoanProductConsumeSearchResponse;
import org.springframework.data.domain.Page;

/**
 * @Auther: hequnayu
 * @Date: 2019/7/15 16:24
 * @Description:
 */
public class LoanProductConsumeRecordModelLazyDataModel extends BaseLazyDataModel<LoanProductConsumeSearchRequest, LoanProductConsumeSearchResponse> {

    private static final long serialVersionUID = -6785843697168505625L;
    LoanProductConsumeRecordService service = SpringContextHolder.getBean(LoanProductConsumeRecordService.class);

    public LoanProductConsumeRecordModelLazyDataModel(LoanProductConsumeSearchRequest loanProductConsumeSearchRequest) {
        super(loanProductConsumeSearchRequest);
    }

    @Override
    protected Page<LoanProductConsumeSearchResponse> doLoad(PageSearcher<LoanProductConsumeSearchRequest> pageSearcher) {
        return service.list(pageSearcher);
    }


}
